<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<t:basicTemplate pageTitle="SWIMv2 - Feedback received by: ${feedOwner}">

	<jsp:attribute name="extrahead">
		<link rel='stylesheet' href='css/feedback.css' type='text/css' />
	</jsp:attribute>



	<jsp:body>
    	<h1>See Feedbacks of ${feedOwner}</h1>

    	<t:errorAndMessage error="${error}" message="${message}" />

		<div id="feedbackImage">
			<img src="img/feedback.jpg" alt="you wanted feebacks" />
		</div>
		<c:if test="${fn:length(lstFeedback) gt 0}"> 
			<c:forEach items="${lstFeedback}" var="map">
				<div class="${map['positive']}_feedback">   	
					<span class="header">Feeback given To:</span> ${map['got_by']}  <br />
					<span class="header">Left By:</span>  ${map['left_by']}   <br />
					<span class="header">Valutation:</span> 	${map['rank']}	<br />
					<span class="header">Comment:</span>  ${map['title_feedback']}  <br />
				</div>
						
				<c:if
				test="${(curious==map['got_by']) && (map['positive'] != 'good') && (map['disputed'] == 'false')}">
					<form name="form_${map['title_feedback']}"
					action="./dispute-feedback" method="POST">
						<input type="hidden" name="feed_data"
						value="${map['id']} @ ${map['got_by']}" />
						<input type="submit" name="submit" id="dispute" value="Dispute Feedback" />
					</form>
				</c:if>
				<br/> <br/>
			</c:forEach>
			
		</c:if>
		  
	   <c:if test="${fn:length(lstFeedback) le 0}">
	   		<p>There are no feedbacks for this user, sorry</p>
	   </c:if> 
  	
    </jsp:body>
</t:basicTemplate>